<style>
    .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
.ui-timepicker-div dl{ text-align: left; }
.ui-timepicker-div dl dt{ height: 25px; }
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
</style>
<script type="text/javascript" >
	stPublishToolbox.load_tooltip();
	stPublishToolbox.on_submitform('#stPublishToolbox', function(data){
        jQuery.prettyPhoto.close();
    });
    stPublishToolbox.loadUploadButton('200');
    stPublishToolbox.loadRemoveButton();
    jQuery(document).ready(function(){
        jQuery('#time_input').datetimepicker({"dateFormat":"dd-mm-yy"});

     });
    function publish(check){
        if(check == '1'){
            jQuery("#display_time").slideDown(null, function(){
                //jQuery("#display_time").slideDown();
            });
        }
        else{
             jQuery("#display_time").slideUp(null, function(){
                //jQuery("#display_time").slideUp();
            })
        }
    }
    function publishing(){
    jQuery("#publishing").slideDown();
    jQuery("#form").slideUp();
    }
</script>
<style>
    .pp_content {
        overflow: auto;
}
</style>
<div class="w100p bgl" id="stcontainer" style="overflow: auto;">
    <div class="w100p bgr p5b">
        <center><div id="publishing" style="display:none;"><img src="<?php echo $config['imagesUrl'] ?>loading.gif" /><br /><br />Publishing....<br /></div></center>
        <form class="stform" id="stPublishToolbox" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" style="width:700px;">
            <ul id="form" style="">
                <li>
                    <label></label>
                    <div class="required">
                        <img src="<?php echo $pic;?>" style="float:left;" height="70" />&nbsp;
                        <?php if($type ==  'flick'){?>
                        <a href="<?php echo $img;?>" target="_blank" >
                        <?php }elseif($type == 'youtube'){?>
                        <a href="http://www.youtube.com/watch?v=<?php echo $_POST['url'];?>" target="_blank" >
                        <?php }
                        elseif($type == 'slideshare'){
                            ?>
                            <a href="<?php echo $_POST['url'];?>" target="_blank" >
                        <?php }?>
                        <?php echo  stripcslashes($title); ?>
                        </a>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Internal content title', $config['plugin_name']); ?>:</label>
                    <div>
                        <input value="" class="" name="data[name]" id="name" type="text"  />
                        <input value="<?php echo $url;?>" name="data[url]" type="hidden" />
                        <input value="<?php echo $img;?>" name="data[img]" type="hidden" />
                        <input value="<?php echo $type;?>" name="data[type]" type="hidden" />
                    </div>
                    <br clear="both" />
                </li>
                <li id="text">
                    <label><?php _e('Text', $config['plugin_name']); ?>:</label>
                    <div>
                        <textarea title="content"
                                  class="" name="data[content]" cols="5" rows="5"
                                  id="content" tabindex="13" ></textarea>
                    </div>
                    <br clear="both" />
                </li>
                
                <li>
                    <label><?php _e('Publish', $config['plugin_name']); ?>:</label>
                    <div>
                        <input type="radio" name="data[publish]" value="0" checked onclick="publish(this.value);"> Publish now<br />
                         <input type="radio" name="data[publish]" value="1" onclick="publish(this.value);"> Publish later
                    </div>
                    <br clear="both" />
                </li>
                <li id="display_time" style="display:none;">
                    <label><?php _e('Time', $config['plugin_name']); ?>:</label>
                    <div class="">
                        <input value="" class="" name="data[time]" id="time_input" type="text"  />
                    </div>
                    <br clear="both" />
                </li>
                
                <li>
                    <input type="submit" value="Publish" onclick="publishing();"/>
                </li>


            </ul>

        </form>
    </div>
</div>